package com.wl.zlmanage.mapper;


import com.wl.zlmanage.bean.Dept;
import com.wl.zlmanage.bean.Role;
import com.wl.zlmanage.bean.User;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {

    Integer getUserDept(@Param("userId") Integer userId);

    User getUserById(@Param("userId") String userId);

    User getUserByUserId(@Param("id") Integer id);

    List<User> getUserList(@Param("page") int page,
        @Param("limit") int limit, @Param("search") String search);

    Integer getUserListCount(@Param("search") String search);

    void saveUser(User user);

    Integer editUser(@Param("user") User user);

    List<Role> getAllRole();

    List<Dept> getAllDept();

    Integer deleteUser(@Param("id") Integer id);

    List<Integer> getUserMatchIds();

    Integer updatePass(@Param("userId") Integer userId,@Param("password") String password);

    Integer addMatchId(@Param("userId") Integer userId);

    Integer updateZlInfoUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateZlSignInfoUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateApprovalInfoUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateApplyApprovalInfoUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateExpendApprovalInfoUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateExpendApprovalInfoNewUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateExpendInfoNewUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateKitUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    Integer updateSystemKitUserId(@Param("srcUserId") Integer srcUserId,@Param("targetUserId") Integer targetUserId);

    List<User> getAllUser();
}
